import wsgiref.handlers
import os

from google.appengine.ext import webapp
from google.appengine.ext.webapp import template

class HomePage(webapp.RequestHandler):
  """ Handles requests for the homepage """
  def get(self):
    self.process()

  def get(self):
    self.process()

  def process(self):
    self.response.headers['Content-Type'] = 'text/html; charset=UTF-8'

    template_values = {}

    path = os.path.join(os.path.dirname(__file__), 'index.html')
    self.response.out.write(template.render(path, template_values))
  
def main():
  application = webapp.WSGIApplication(
    [('/', HomePage)],
    debug=True)
  wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
  main()
